<include file="public/min-header"/>
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>

<div class="wrapper">
    <include file="public/breadcrumb"/>
    <section class="content ">
        <!-- Main content -->
        <div class="container-fluid">

            <div class="panel panel-default">
                <div class="panel-body ">   
                    <!--表单数据-->
                    <form method="post" id="handle_shop">

                        <!--通用信息-->
                    <div class="tab-content col-md-10">                 	  
                        <div class="tab-pane active" id="tab_tongyong">                           
                            <table class="table table-bordered">
                                <tbody>

                                <tr>
                                    <td class="col-sm-2"><span style="color:#F00;">*</span>等级名称：</td>
                                    <td class="col-sm-8">
                                        <input type="text" class="form-control" name="gradeName" placeholder="请输入等级名称">
                                    </td>
                                </tr>

                                <tr>
                                    <td class="col-sm-2"><span style="color:#F00;">*</span>有效时间（月）：</td>
                                    <td class="col-sm-8">
                                        <input type="number" class="form-control" name="validMonth" placeholder="请输入有效时间，即购买一次该等级可持续多少时间，以月为单位">
                                        <span style="color:#F00;">
                                            购买一次该等级的持续时间，如购买一次持续3个月的有效期，则直接输入3即可
                                        </span>
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td><span style="color:#F00;">*</span>购买价格:</td>
                                    <td class="col-sm-8">
                                        <div class="col-xs-4">
                                            <input type="text" class="form-control input-sm" name="gradePrice" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" >
                                        </div>
                                    </td>
                                </tr>

                                <tr>
                                    <td class="col-sm-2"><span style="color:#F00;">*</span>商品折扣：</td>
                                    <td class="col-sm-8">
                                        <input type="text" class="form-control" name="gradeDiscount" placeholder="请输入等级折扣，eq：9折则输入0.9；8.5折则输入0.85" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')">
                                    </td>
                                </tr>

                                <tr>
                                    <td class="col-sm-2"><span style="color:#F00;">*</span>打位预约折扣：</td>
                                    <td class="col-sm-8">
                                        <input type="text" class="form-control" name="reservationDiscount" placeholder="请输入等级折扣，eq：9折则输入0.9；8.5折则输入0.85" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')">
                                    </td>
                                </tr>

                                <tr>
                                    <td>等级卡片图片：</td>
                                    <td class="col-sm-8">
                                        <div class="col-sm-4">
                                            <input type="text" class="form-control" style="width:350px;margin-left:-15px;" name="gradeImg" id="gradeImg" >
                                        </div>
                                        <div class="col-sm-4">
                                            <input type="button" class="btn btn-default" onClick="GetUploadify(1,'gradeImg','grade','')"  value="上传等级卡片图片"/>
                                        </div>
                                    </td>
                                </tr>

                                <tr>
                                    <td>会员权益详情介绍:</td>
                                    <td class="col-sm-8">
                                        <textarea class="form-control" rows="10" cols="60" name="gradeContent"></textarea>
                                    </td>
                                </tr>

                                <tr>
                                    <td class="col-sm-2">排序：</td>
                                    <td class="col-sm-8">
                                        <input type="number" value="99" class="form-control" name="gradeSort" placeholder="请输入排序">
                                        <span style="color:#F00;">
                                            数字越小，排名越靠前
                                        </span>
                                    </td>
                                </tr>

                                </tbody> 
                                <tfoot>
                                	<tr>
                                        <td></td>
                                	    <td class="text-right"><input class="btn btn-primary" type="button" onclick="shop_submit()" value="保存"></td>
                                    </tr>
                                </tfoot>                               
                            </table>
                        </div>                           
                    </div>              
			    	</form><!--表单数据-->
                </div>
            </div>
        </div>
    </section>
</div>
<script>
function shop_submit(){
    ajax_form_submit("handle_shop", "{:url('user/doGradeAdd')}");
}
</script>
 </body>
 </html>